package pl.edu.mimuw.mas.agent.behaviour.helicopter.areaassignment;

import java.util.HashSet;

import pl.edu.mimuw.mas.agent.HelicopterAgent;
import pl.edu.mimuw.mas.message.PositionMessage;
import jade.core.behaviours.SequentialBehaviour;

/**
 * Złożone zachowanie - logika lidera helikopterów, najpierw nasłuchuj pozycji
 * potem dokonaj podziału planszy. Agreguje zachowanie
 * {@link ListenPositionBehaviour} i {@link AssignSearchAreasBehaviour}.
 */
public class LeaderSequentialBehaviour extends SequentialBehaviour {
	private static final long serialVersionUID = 5140469459090133508L;
	private HashSet<PositionMessage> agents;
	
	public LeaderSequentialBehaviour(HelicopterAgent agent, int agentCount) {
		agents = new HashSet<PositionMessage>(agentCount);
		
		addSubBehaviour(new ListenPositionBehaviour(agent, agents, agentCount));
		addSubBehaviour(new AssignSearchAreasBehaviour(agent, agents));
	}
}
